import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_applearnprogrom/video/Discovery.dart';
import 'package:flutter_applearnprogrom/video/Video.dart';
import 'package:flutter_applearnprogrom/video/widget/DiscoverBanner.dart';
class Home extends StatelessWidget {

  final List _tabs = [
    {'icon': Icons.build, 'text': '发现'},
    {'icon': Icons.video_call, 'text': '视频'},
    {'icon': Icons.settings, 'text': '配置'},
    {'icon': Icons.minimize, 'text': '我的'},
  ];
  final List<Widget> _pages = [
    Discovery(), Video(),
//    Mine(), Friends(), Account()

  ];

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return CupertinoTabScaffold(
    tabBar: CupertinoTabBar(
      activeColor: Theme.of(context).primaryColor,
        items: _tabs
            .map((tab)=>BottomNavigationBarItem(
            icon:Icon(tab['icon']),
            title: Text(tab['text'])
        
        )).toList()
    ),
      tabBuilder: (BuildContext context,int index)

      {
        return _pages[index];
      }
      ,

      
    );
  }

}